package com.rhb.af.bean;

public abstract class BaseQuery  implements java.io.Serializable {
	private String orderBy = "";
	private boolean desc = true;
	private int start = 0;
	private int count = 15;
	
	private int allCount = 0;
	
	public int getAllCount() {
		return allCount;
	}

	public void setAllCount(int allCount) {		
		this.allCount = allCount;
	}

	public int getStart() {
		return start;
	}

	public void setStart(int start) {
		this.start = start;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public BaseQuery(){
	}

	public String getOrderBy() {
		return orderBy;
	}

	public void setOrderBy(String orderBy) {
		if(!this.orderBy.equals(orderBy)){
			this.orderBy = orderBy;
		}else{
			if(desc){
				desc = false;
			}else{
				desc = true;
			}
		}
		
		//System.out.println(getOrderBySql());
	}

	public boolean isDesc() {
		return desc;
	}

	public void setDesc(boolean desc) {
		this.desc = desc;
	}
		
	public String getSql(boolean isCount){
		return null;
	}

	public String getFrom() {
		return null;
	}
	
	public Object toObject(Object[] args){
		return null;
	}

}
